home *** CD-ROM | disk | FTP | other *** search
/ Turnbull China Bikeride / Turnbull China Bikeride - Disc 2.iso / STUTTGART / FROMUTS / UNIXLIB37B / src / unix / c / chdir < prev    next >
Text File  |  1991-06-14  |  343b  |  25 lines

  1. static char sccs_id[] = "@(#) chdir.c 1.2 "__DATE__" HJR";
  2.  
  3. /* chdir.c (c) Copyright 1990 H.Rogers */
  4.  
  5. #include <errno.h>
  6.  
  7. #include "sys/types.h"
  8. #include "sys/unix.h"
  9. #include "sys/os.h"
  10.  
  11. int chdir(register char *path)
  12. {
  13. os_error *e;
  14.  
  15. path = __uname(path,0);
  16.  
  17. if (e = os_fsctrl(0,path,0,0))
  18.   {
  19.   __seterr(e);
  20.   return(-1);
  21.   }
  22.  
  23. return(0);
  24. }
  25.